#root {
  max-width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

/* Custom App Styles */
.rounded-xl {
  border-radius: 1rem;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Micro-interactions */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeIn 0.6s ease-out;
}

button {
  transition: all 0.2s ease-in-out;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(1px);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .p-8 {
    padding: 1.5rem;
  }

  .p-10 {
    padding: 2rem;
  }
}

/* Improved readability for dark mode */
.dark\:bg-gray-800 {
  background-color: #1f2937;
}

.dark\:bg-gray-900 {
  background-color: #111827;
}

.dark\:text-gray-300 {
  color: #d1d5db;
}

.dark\:text-gray-400 {
  color: #9ca3af;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Prevent layout shift by setting chart container height */
.h-64 {
  height: 16rem;
}

/* iPhone样式容器 */
.iphone-container {
  position: relative;
  width: 375px;
  height: 812px;
  margin: 2rem auto;
  background-color: #fff;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 0 0 10px #f2f2f2, 0 0 0 11px #ccc, 0 20px 30px -10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.dark .iphone-container {
  background-color: #1a1a1a;
  box-shadow: 0 0 0 10px #2a2a2a, 0 0 0 11px #444, 0 20px 30px -10px rgba(0, 0, 0, 0.5);
}

/* iOS状态栏 */
.ios-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  height: 44px;
}

.ios-status-bar .time {
  font-weight: bold;
}

.ios-status-bar .status-icons {
  display: flex;
  gap: 0.5rem;
}

/* 应用内容区域 */
.app-content {
  height: calc(100% - 44px - 83px); /* 容器高度减去状态栏和导航栏 */
  overflow-y: auto;
  background-color: #fff;
}

.dark .app-content {
  background-color: #1a1a1a;
  color: #fff;
}

/* 底部导航 */
.ios-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 83px;
}

.dark .ios-bottom-nav {
  background-color: rgba(26, 26, 26, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #8e8e93;
  font-size: 10px;
  padding: 0.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item i {
  font-size: 24px;
  margin-bottom: 0.2rem;
}

.nav-item.active {
  color: #007aff;
}

.dark .nav-item.active {
  color: #0a84ff;
}

/* 主题切换按钮 */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #007aff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
  z-index: 1000;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.theme-toggle i {
  font-size: 1.5rem;
}

/* 开发导航 */
.dev-nav {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem;
  max-width: 400px;
}

.dark .dev-nav {
  background-color: #2d3748;
  border-color: #4a5568;
}

.dev-nav h3 {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #343a40;
}

.dark .dev-nav h3 {
  color: #f8f9fa;
}

.dev-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dev-nav li {
  margin: 0.5rem 0;
}

.dev-nav a {
  display: block;
  padding: 0.5rem;
  color: #007bff;
  text-decoration: none;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}

.dev-nav a:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.dark .dev-nav a {
  color: #63b3ed;
}

.dark .dev-nav a:hover {
  background-color: rgba(99, 179, 237, 0.1);
}

/* 定制按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #007aff;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: #0066cc;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

/* 信息框 */
.info-box {
  background-color: rgba(0, 122, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin: 1rem 0;
}

.dark .info-box {
  background-color: rgba(10, 132, 255, 0.15);
}

/* 动画效果 */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(0, 122, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 122, 255, 0.5);
  }
}

.glow-animation {
  animation: glow 2s infinite;
}

/* 响应式设计 */
@media (max-width: 500px) {
  .iphone-container {
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .theme-toggle {
    bottom: 100px;
  }

  .dev-nav {
    display: none; /* 在移动设备上隐藏开发导航 */
  }
}
